<h3>GPA and Course Information</h3>
	<?php echo $info ?>
	<p>Underlined Items are required</p>
	<div id="course_list">
		<?php echo $this->Session->flash('cl'); ?>
		<span>Added Courses</span>
		<table class="list" cellpadding="0" cellspacing="0">
		<tr><th>Name:</th><th>Grade:</th><th>Area:</th><th>Completion Date:</th><th>Delete:</th></tr>
<?php
	foreach ($this->data['Course'] as $line => $c) {
	
		echo (($line+1)%2==1)? '<tr class="odd">': '<tr class="even">';
		echo "\n<td>{$c['coursename']}</td><td>"
				 . strtoupper($c['grade'])
				 . "</td><td>" . ucwords($c['category']). "</td>";
		
		$dt = explode( '-', $c['complete_date']);
		echo "<td>{$dt[1]}/{$dt[0]}</td><td>";
		echo $this->Js->link('delete', 
						array('controller' => 'Courselists', 'action' => 'deleteCourse',  $c['id']), 
						array('update' => '#course_list'));
		echo "</td></tr>";
	}
?>
		</table>
	</div><!--end courselist-->
	<?php echo $this->Form->create('Course', array('action' => 'addCourse', 'default' => false)); ?>
	<fieldset>
		<?php echo $this->Form->input('courselist_id', array(
																										'type' => 'hidden', 
																										'value' => $this->data['Courselist']['id'])); ?>
		<div class="row">	
		<?php echo $this->Form->input('coursename', array('label' => 'Course Name', 'div' => false)); ?>	
		<?php $options = array('' => '(grade)', 
		                       'na' => 'N/A', 
		                       'p' => 'Pass (P)', 
		                       'n' => 'no-pass (N)', 
		                       'd' => 'D' , 
		                       'c' => 'C', 
		                       'b' => 'B', 
		                       'a' => 'A');
	  echo $this->Form->input('grade', array('options' => $options, 'label'=> false, 'div' => false)); ?>
	  <?php $categories= array('psychology' => 'Psychology',
												 'math and computers'=> 'Math and Computers', 
												 'other social science' => 'Other Social Science',
												 'physical science and biology' => 'Physical Science and Biology',
												 'humanities' => 'Humanities');
	        echo $this->Form->input('category', array('label' => false, 'options' => $categories, 'div' => false)); ?>
	  </div>
	  <div class="row">
	  <?php echo $this->Form->input('complete_date', array('label' => 'Date Complete', 
	                                                       'type' => 'date',
	                                                       'minYear' => date('Y') - 70,
     																							       'maxYear' => date('Y') + 2,  
	                                                       'div' => false)); ?>
		</div>
	</fieldset>
	<?php  echo $this->Js->submit('Add Course', array('update' => '#course_list', 'url' => array('controller' => 'Courselists', 
	                                                                                             'action' => 'addCourse', 
	                                                                                             $this->data['Courselist']['id']))); ?>   
  <?php echo $this->Form->end(); ?>

	<p>Report your overall undergraduate GPA here.</p>
	<p>Please compute your own grade point averages (GPA's).<br />To do 
so, use the equivalences: A = 4, B = 3, C = 2, D = 1.  Ignore +'s 
and -'s.  Do not include Physical Education or Military Science.  If 
you have a "credit hour" system, the grades may be weighted by 
credit hours; otherwise count each course equally. Your entries below should range
from 0.00 to 4.00<br /><strong>NOTE: (International Students) If your school's grading system is not based on letter grades, do not report your overall grade point averages below.</strong></p>
	<?php echo $this->Form->create('Courselist', array('action' => 'edit')); ?>
		<?php echo $this->Form->input('id'); ?>
		<?php echo $this->Form->input('cgpa_fresh', array(
																									'label' => 'Freshman GPA (x.xx)', 'size' => 5)); ?>
    <?php echo $this->Form->input('cgpa_soph', array(
    																							'label' => 'Sophomore GPA',  'size' => 5)); ?>
    <?php echo $this->Form->input('cgpa_junior', array(
    																							'label' => 'Junior GPA',  'size' => 5)); ?>
    <?php echo $this->Form->input('cgpa_senior', array(
    																							'label' => 'Senior GPA',  'size' => 5)); ?>
    <?php echo $this->Form->input('cgpa_all', array(
    																						'label' => 'Overall Undergraduate GPA',  'size' => 5)); ?>
    <?php echo $this->Form->input('cgpa_grad', array(
    																						'label' => 'Graduate GPA (if any)',  'size' => 5)); ?>
	<?php echo $this->Form->end('Save'); ?>
